package org.dba.util;

public class DbUtil {
	
	public static String[] getCmd(String customCMD){
		String osName = System.getProperty("os.name");
		String[] cmd = new String[3];

		if (osName.equals("Windows NT")) {
			cmd[0] = "cmd.exe";
			cmd[1] = "/C";
			cmd[2] = customCMD;
		} else if (osName.equals("Windows XP")) {
			cmd[0] = "cmd.exe";
			cmd[1] = "/C";
			cmd[2] = customCMD;
		} else if (osName.equals("Windows 95")) {
			cmd[0] = "command.com";
			cmd[1] = "/C";
			cmd[2] = customCMD;
		} else if (osName.equals("Windows 7")) {
			cmd[0] = "cmd.exe";
			cmd[1] = "/C";
			cmd[2] = customCMD;
		}
		return cmd;
	}

}
